package com.yzd.xander.entity;

import javax.persistence.*;

/**
 * Created by YE on 2018-06-07.
 */
@Entity
@Table(name = "Group", schema = "dbo", catalog = "GroupData")
public class Group {
    private int id;
    private Integer qqNum;
    private String nick;
    private Integer age;
    private Integer gender;
    private Integer auth;
    private int qunNum;

    @Id
    @Column(name = "ID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "QQNum")
    public Integer getQqNum() {
        return qqNum;
    }

    public void setQqNum(Integer qqNum) {
        this.qqNum = qqNum;
    }

    @Basic
    @Column(name = "Nick")
    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    @Basic
    @Column(name = "Age")
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Basic
    @Column(name = "Gender")
    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    @Basic
    @Column(name = "Auth")
    public Integer getAuth() {
        return auth;
    }

    public void setAuth(Integer auth) {
        this.auth = auth;
    }

    @Basic
    @Column(name = "QunNum")
    public int getQunNum() {
        return qunNum;
    }

    public void setQunNum(int qunNum) {
        this.qunNum = qunNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Group that = (Group) o;

        if (id != that.id) return false;
        if (qunNum != that.qunNum) return false;
        if (qqNum != null ? !qqNum.equals(that.qqNum) : that.qqNum != null) return false;
        if (nick != null ? !nick.equals(that.nick) : that.nick != null) return false;
        if (age != null ? !age.equals(that.age) : that.age != null) return false;
        if (gender != null ? !gender.equals(that.gender) : that.gender != null) return false;
        if (auth != null ? !auth.equals(that.auth) : that.auth != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (qqNum != null ? qqNum.hashCode() : 0);
        result = 31 * result + (nick != null ? nick.hashCode() : 0);
        result = 31 * result + (age != null ? age.hashCode() : 0);
        result = 31 * result + (gender != null ? gender.hashCode() : 0);
        result = 31 * result + (auth != null ? auth.hashCode() : 0);
        result = 31 * result + qunNum;
        return result;
    }

    @Override
    public String toString() {
        return "Group{" +
                "id=" + id +
                ", qqNum=" + qqNum +
                ", nick='" + nick + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                ", auth=" + auth +
                ", qunNum=" + qunNum +
                '}';
    }
}
